/*
using MyGeneration/Template/NHibernate (c) by Sharp 1.4
based on OHM (alvy77@hotmail.com)
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Model
{

	[Serializable]
	public class Goods 
	{
		#region Member Variables

		protected string _id;
		protected string _name;
		protected int? _newornot;
		protected string _brand;
		protected string _title;
		protected string _goodscode;
		protected string _text;
		protected string _typeid;
        protected DateTime? _createdate;
		protected bool _bIsDeleted;
		protected bool _bIsChanged;
		#endregion
		
		
		#region Public Properties
		
		public virtual string Id
		{
			get { return _id; }
			set 
			{
			  if (value != null && value.Length > 36)
			    throw new ArgumentOutOfRangeException("Id", "Id value, cannot contain more than 36 characters");
			  _bIsChanged |= (_id != value); 
			  _id = value; 
			}
			
		}
		
		public virtual string Name
		{
			get { return _name; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("Name", "Name value, cannot contain more than 100 characters");
			  _bIsChanged |= (_name != value); 
			  _name = value; 
			}
			
		}
		
		public virtual int? NewOrNot
		{
			get { return _newornot; }
			set { _bIsChanged |= (_newornot != value); _newornot = value; }
			
		}
		
		public virtual string Brand
		{
			get { return _brand; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("Brand", "Brand value, cannot contain more than 100 characters");
			  _bIsChanged |= (_brand != value); 
			  _brand = value; 
			}
			
		}
		
		public virtual string Title
		{
			get { return _title; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("Title", "Title value, cannot contain more than 100 characters");
			  _bIsChanged |= (_title != value); 
			  _title = value; 
			}
			
		}
		
		public virtual string GoodsCode
		{
			get { return _goodscode; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("GoodsCode", "GoodsCode value, cannot contain more than 100 characters");
			  _bIsChanged |= (_goodscode != value); 
			  _goodscode = value; 
			}
			
		}
		
		public virtual string Text
		{
			get { return _text; }
			set 
			{
			  if (value != null && value.Length > 2000)
			    throw new ArgumentOutOfRangeException("Text", "Text value, cannot contain more than 2000 characters");
			  _bIsChanged |= (_text != value); 
			  _text = value; 
			}
			
		}
		
		public virtual string TypeId
		{
			get { return _typeid; }
			set 
			{
			  if (value != null && value.Length > 36)
			    throw new ArgumentOutOfRangeException("TypeId", "TypeId value, cannot contain more than 36 characters");
			  _bIsChanged |= (_typeid != value); 
			  _typeid = value; 
			}
			
		}

        public virtual DateTime? CreateDate
		{
			get { return _createdate; }
			set { _bIsChanged |= (_createdate != value); _createdate = value; }
			
		}
		

		public virtual bool IsDeleted
		{
			get
			{
				return _bIsDeleted;
			}
			set
			{
				_bIsDeleted = value;
			}
		}

        public virtual bool IsChanged
		{
			get
			{
				return _bIsChanged;
			}
			set
			{
				_bIsChanged = value;
			}
		}
		
		#endregion 
		
	}
	
}
